import java.util.Objects;

/**
 * @Author liangzai
 * @Description:
 */

class Student{
    public String id;

    public Student(String id) {
        this.id = id;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return Objects.equals(id, student.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }
}

public class Test {
    public static void main(String[] args) {
        HashBuck<Student,String> hashBuck = new HashBuck<>();
        Student student1 = new Student("1234");
        Student student2 = new Student("1234");

        hashBuck.push(student1,"liuzhi");
        System.out.println(hashBuck.getVal(student2));
    }
}
